﻿using SvGame.Objects;

namespace SvGame.Logic;

public static partial class GameLogic
{
    public static bool AddMoney(this Player player, EMoneyType moneyType, long count)
    {
        switch (moneyType)
        {
            case EMoneyType.金币:
                player.Gold += count;
                break;
            case EMoneyType.宝石:
                player.Gem += count;
                break;
            case EMoneyType.潜能:
                player.Pot += count;
                break;
            case EMoneyType.经验:
                player.ExpAdd(count);
                break;
            default:
                loger.Warn($"Player AddMoney 货币类型错误 moneyType{moneyType} Count{count}");
                break;
        }
        return true;
    }
    
}
